import 'package:wanxiang_app/generated/json/base/json_field.dart';
import 'package:wanxiang_app/generated/json/price_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class PriceEntity {
	late int code;
	late String msg;
	late List<PriceData> data;

	PriceEntity();

	factory PriceEntity.fromJson(Map<String, dynamic> json) => $PriceEntityFromJson(json);

	Map<String, dynamic> toJson() => $PriceEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class PriceData {
	late String id;
	@JSONField(name: "sort_id")
	late String sortId;
	late String bprice;
	late String eprice;
	late String content;

	PriceData();

	factory PriceData.fromJson(Map<String, dynamic> json) => $PriceDataFromJson(json);

	Map<String, dynamic> toJson() => $PriceDataToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}